package com.hdoit.kylin.web.group.modelconfig;

import com.hdoit.kylin.web.group.providers.TemplateProvider;
import com.tennetcn.component.attribute.DisplayNameAttribute;
import com.tennetcn.component.attribute.DropDownListAttribute;
import com.tennetcn.component.attribute.RequiredAttribute;
import com.tennetcn.component.attribute.base.ModelMetadataAttributeConfiguration;

public class TemplateConfig extends ModelMetadataAttributeConfiguration{
	public TemplateConfig(){
		this.setProperty("templateId")
			.hasAttribute(new DisplayNameAttribute("模版名称"))
			.hasAttribute(new RequiredAttribute("选择模版"))
			.hasAttribute(new DropDownListAttribute(new TemplateProvider()));
		this.setProperty("templateName")
			.hasAttribute(new DisplayNameAttribute("模板名称"))
			.hasAttribute(new RequiredAttribute("模板名称为必填"));
		this.setProperty("comments")
			.hasAttribute(new DisplayNameAttribute("模版内容"));	
	}
}
